package com.frank.easyexcel.model;

import com.alibaba.excel.annotation.ExcelProperty;
import com.frank.easyexcel.converter.GenderConverter;
import com.frank.easyexcel.converter.KeySplitConverter;
import com.frank.easyexcel.converter.LocalDateConverter;
import lombok.Getter;
import lombok.Setter;

import java.time.LocalDate;

/**
 * @author 小石潭记
 * @date 2020/10/16 15:47
 * @Description: ${todo}
 */
@Getter
@Setter
public class PersonInExcel {

    @ExcelProperty(value = "id")
    private String id;
    // 这里的数据如果是 BEIJING:北京 这样的数据，只取前面的BEIJING
    @ExcelProperty(value = "姓名", converter = KeySplitConverter.class)
    private String name;
    // 枚举类
    @ExcelProperty(value = "性别", converter = GenderConverter.class)
    private PersonGender sex;

    @ExcelProperty(value = "生日", converter = LocalDateConverter.class)
    private LocalDate birth;

}
